#!/bin/sh

ver_new="$1"
ver_old="$2"

# NOTE: .pre-upgrade doesn't work here, that's why it's in .post-upgrade.
if [ "${ver_new%%.*}" = 3 ] && [ "${ver_old%%.*}" = 4 ]; then
	cat >&2 <<-EOF
	*
	* Until Alpine 3.20, the yq package was mikefarah's Go implementation. Now the
	* yq package is kislyuk's Python implementation (as in most distros), and the
	* Go implementation has been renamed to yq-go. They are incompatible.
	*
	* If you want to keep the Go implementation: apk del yq && apk add yq-go
	*
	EOF
fi

exit 0
